package com.hzlj.position.locate.common.dto.reportInspection;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fz.common.base.enums.db.EnableType;
import com.fz.common.base.enums.db.InType;
import com.fz.common.base.enums.db.QueryField;
import com.fz.common.base.enums.db.RangeType;
import com.hzlj.position.locate.common.model.ReportInspection;
import com.hzlj.sqjz.jz.common.dto.common.JzCommonQueryParamDTO;
import com.hzlj.sqjz.jz.common.model.JzJbxx;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

import static com.fz.common.base.core.date.DateUtils.*;

/**
 * 通信联络核查-核查(ReportInspection)查询参数DTO
 *
 * @author lifh
 * @date 2023-07-21 14:47:10
 */
@Data
@ToString
@Accessors(chain = true)
public class ReportInspectionQueryParamDTO extends JzCommonQueryParamDTO {
    /**
     * 矫正状态,JZZT
     */
    @QueryField(model = JzJbxx.class)
    private String jzzt = "";
    /**
     * 主键
     */
    @QueryField(model = ReportInspection.class)
    private String id;
    /**
     * 所属天
     */
    @QueryField(model = ReportInspection.class)
    @JsonFormat(locale = LOCALE, timezone = TIME_ZONE, pattern = DATE_SHORT_FORMAT)
    private Date belongDay;
    /**
     * 所属天(开始)
     */
    @QueryField(model = ReportInspection.class, range = RangeType.GTE, value = "belongDay")
    @JsonFormat(locale = LOCALE, timezone = TIME_ZONE, pattern = DATE_SHORT_FORMAT)
    private Date beginBelongDay = DateUtil.beginOfDay(new Date());
    /**
     * 所属天(结束)
     */
    @QueryField(model = ReportInspection.class, range = RangeType.LTE, value = "belongDay")
    @JsonFormat(locale = LOCALE, timezone = TIME_ZONE, pattern = DATE_SHORT_FORMAT)
    private Date endBelongDay = DateUtil.beginOfDay(new Date());
    /**
     * 人工上报状态,dict-REPORT_STATUS
     */
    @QueryField(model = ReportInspection.class)
    private String reportStatus;
    /**
     * 人工上报状态,dict-REPORT_STATUS
     */
    @QueryField(model = ReportInspection.class, in = InType.COMMA_ARRAY, value = "reportStatus")
    private List<String> reportStatuses;
    /**
     * 是否越界
     */
    @QueryField(model = ReportInspection.class)
    private Boolean crossBorder;
    /**
     * 是否已经处理,dict-HANDLE_STATUS
     */
    @QueryField(model = ReportInspection.class)
    private String handleStatus;
    /**
     * 点验方式,dict-REPORT_TYPE
     */
    @QueryField(model = ReportInspection.class)
    private String reportType;
    /**
     * 点验通知是否发送成功
     */
    @QueryField(model = ReportInspection.class)
    private Boolean notice;

    /**
     * 是否必须达到了check时间
     */
    @QueryField(enable = EnableType.FALSE)
    private Boolean reachSpotCheckTime;

    /**
     * 是否按照SpotCheckTime倒序
     */
    @QueryField(enable = EnableType.FALSE)
    private Boolean sortBySpotCheckTime=false;
}
